package per.hx.bs.entity.sys;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import per.hx.bs.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.List;

/**
 * @author HuXing
 * @date 2018/2/26  11:57
 */
@TableName("sys_role")
public class SysRoleDO extends BaseEntity<SysRoleDO> {
    @TableId
    private Long roleId;
    private String roleName;
    private String roleSign;
    @TableField(exist = false)
    private List<Long> menuIds;

    public SysRoleDO(String roleName, String roleSign, List<Long> menuIds) {
        this.roleName = roleName;
        this.roleSign = roleSign;
        this.menuIds = menuIds;
    }

    public SysRoleDO() {
    }

    public SysRoleDO(String roleSign) {
        this.roleSign = roleSign;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleSign() {
        return roleSign;
    }

    public void setRoleSign(String roleSign) {
        this.roleSign = roleSign;
    }

    public List<Long> getMenuIds() {
        return menuIds;
    }

    public void setMenuIds(List<Long> menuIds) {
        this.menuIds = menuIds;
    }

    @Override
    public String toString() {
        return "SysRoleDO{" +
                "roleId=" + roleId +
                ", roleName='" + roleName + '\'' +
                ", roleSign='" + roleSign + '\'' +
                ", menuIds=" + menuIds +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return this.roleId;
    }
}
